package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.lease.CompanyInfoEntity;
import com.sgb.kjwl.model.entity.lease.DictEntity4;
import com.sgb.kjwl.model.entity.lease.LeaseMapEntity;
import com.sgb.kjwl.model.entity.request.LeaseHallMapFilterJson;
import com.sgb.kjwl.model.entity.supplier3.DictEntity3;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 地图查找
 */
public interface LeaseMapAPI {

    //通过企业no获取企业信息
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL, "tokenType:pc"})
    @GET("v1/app/leasepublic/getCompanyImgByNo")
    Call<BaseEntity<CompanyInfoEntity>> getCompanyImgByNo(@Query("no") String companyNo, @Query("type") String type);

    //地图查找-获取类型
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL, "tokenType:pc"})
    @GET("v1/app/leasemap/getAllSrarchType")
    Call<BaseEntity<List<DictEntity4>>> getAllSrarchType();

    //地图查找-根据类型获取分类一级信息(类型为,1=机械,2=设备,3=车辆,4=房产,5=土地，6=工厂，7=农机)
    @GET("v1/app/leasemap/getFistcategory")
    Call<BaseEntity<List<DictEntity3>>> getFistcategory(@Query("type") String type);

    //地图查找-根据类型和一级获取二级类目
    @GET("v1/app/leasemap/getSecondcategory")
    Call<BaseEntity<List<DictEntity3>>> getSecondcategory(@Query("type") String type, @Query("parentNo") String parentNo);

    //地图查找-筛选
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL, "tokenType:pc"})
    @POST("v1/app/leasemap/getLeaseMapSearch")
    Call<BaseEntity<ListResponse<List<LeaseMapEntity>>>> getLeaseMapSearch(@Body LeaseHallMapFilterJson filterJson);

}
